<template>
  <div class="container">
    <!-- 审核 -->
    <el-dialog
      title="题目审核"
      :visible.sync="chkStateVisible"
      width="30%"
      :before-close="() => this.$emit('update:chkStateVisible', false)"
    >
      <el-form class="dialogText" :rules="rule">
        <el-radio v-model="radio" label="1">通过</el-radio>
        <el-radio v-model="radio" label="2">拒绝</el-radio>
        <el-input
          prop="chkRemarks"
          type="textarea"
          v-model="chkRemarks"
          placeholder="请输入审核意见"
        ></el-input>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="$emit('update:chkStateVisible', false)">取 消</el-button>
        <el-button type="primary" @click="$emit('cofirm', chkRemarks)">确 定</el-button>
      </span>
    </el-dialog>
    <!-- /审核 -->
  </div>
</template>
<script>
export default {
  name: 'checkIndex',
  components: {},
  props: {
    chkStateVisible: {
      type: Boolean,
      required: true
    },
    radio: {
      type: String,
      required: true
    }
  },
  data () {
    return {
      chkRemarks: '',
      rule: {
        chkRemarks: [
          { required: true, message: '请输入审核意见', trigger: 'change' }
        ]
      }
    }
  },
  computed: {},
  watch: {},
  created () {},
  mounted () {},
  methods: {
  }
}
</script>

<style scoped lang='scss' rel="stylesheet/scss">
.dialogText {
  margin: 0 40px;
  .el-textarea {
    margin-top: 20px;
  }
}
</style>
